const {  deleteAddressesById, addAddresses,getDresses,updateDresses } = require('../dao/addressesDao.js')

module.exports.deleteAddressesById = async AddressesId => {
    const result = await deleteAddressesById(AddressesId);
    if (result.ok === 1) {
        return true;
    }
    return false;
}

module.exports.addAddresses = async newAddresses => {
    const result = await addAddresses(newAddresses);
    if (result._id) {
        return true;
    }
    return false;
}

module.exports.getDresses = async userId => {
    const result = await getDresses(userId);
    return result;
}
module.exports.updateDresses = async updateMsg => {
    const result = await updateDresses(updateMsg);
    return result;
}